Integrand size = 36, antiderivative size = 138 \[ \int \frac {a B+b B \tan (c+d x)}{\sqrt {\cot (c+d x)} (a+b \tan (c+d x))} \, dx=\frac {B \arctan \left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}-\frac {B \arctan \left (1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {B \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}-\frac {B \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {21, 3557, 335, 217, 1179, 642, 1176, 631, 210} \[ \int \frac {a B+b B \tan (c+d x)}{\sqrt {\cot (c+d x)} (a+b \tan (c+d x))} \, dx=\frac {B \arctan \left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}-\frac {B \arctan \left (\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{\sqrt {2} d}+\frac {B \log \left (\cot (c+d x)-\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{2 \sqrt {2} d}-\frac {B \log \left (\cot (c+d x)+\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{2 \sqrt {2} d} \]
[In]
[Out]
Rule 21
Rule 210
Rule 217
Rule 335
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 3557
Rubi steps \begin{align*} \text {integral}& = B \int \frac {1}{\sqrt {\cot (c+d x)}} \, dx \\ & = -\frac {B \text {Subst}\left (\int \frac {1}{\sqrt {x} \left (1+x^2\right )} \, dx,x,\cot (c+d x)\right )}{d} \\ & = -\frac {(2 B) \text {Subst}\left (\int \frac {1}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d} \\ & = -\frac {B \text {Subst}\left (\int \frac {1-x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d}-\frac {B \text {Subst}\left (\int \frac {1+x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d} \\ & = -\frac {B \text {Subst}\left (\int \frac {1}{1-\sqrt {2} x+x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 d}-\frac {B \text {Subst}\left (\int \frac {1}{1+\sqrt {2} x+x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 d}+\frac {B \text {Subst}\left (\int \frac {\sqrt {2}+2 x}{-1-\sqrt {2} x-x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 \sqrt {2} d}+\frac {B \text {Subst}\left (\int \frac {\sqrt {2}-2 x}{-1+\sqrt {2} x-x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 \sqrt {2} d} \\ & = \frac {B \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}-\frac {B \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}-\frac {B \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {B \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d} \\ & = \frac {B \arctan \left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}-\frac {B \arctan \left (1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {B \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}-\frac {B \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d} \\ \end{align*}
Time = 0.06 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.80 \[ \int \frac {a B+b B \tan (c+d x)}{\sqrt {\cot (c+d x)} (a+b \tan (c+d x))} \, dx=\frac {B \left (2 \arctan \left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )-2 \arctan \left (1+\sqrt {2} \sqrt {\cot (c+d x)}\right )+\log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )-\log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )\right )}{2 \sqrt {2} d} \]
[In]
[Out]
Time = 0.31 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.65
method | result | size |
default | \(-\frac {B \sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}}{1+\cot \left (d x +c \right )-\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )\right )}{4 d}\) | \(90\) |
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.27 (sec) , antiderivative size = 386, normalized size of antiderivative = 2.80 \[ \int \frac {a B+b B \tan (c+d x)}{\sqrt {\cot (c+d x)} (a+b \tan (c+d x))} \, dx=\frac {1}{2} \, \left (-\frac {B^{4}}{d^{4}}\right )^{\frac {1}{4}} \log \left (\frac {B^{3} \sqrt {\frac {\cos \left (2 \, d x + 2 \, c\right ) + 1}{\sin \left (2 \, d x + 2 \, c\right )}} \sin \left (2 \, d x + 2 \, c\right ) + {\left (d^{3} \cos \left (2 \, d x + 2 \, c\right ) + d^{3}\right )} \left (-\frac {B^{4}}{d^{4}}\right )^{\frac {3}{4}}}{\cos \left (2 \, d x + 2 \, c\right ) + 1}\right ) - \frac {1}{2} \, \left (-\frac {B^{4}}{d^{4}}\right )^{\frac {1}{4}} \log \left (\frac {B^{3} \sqrt {\frac {\cos \left (2 \, d x + 2 \, c\right ) + 1}{\sin \left (2 \, d x + 2 \, c\right )}} \sin \left (2 \, d x + 2 \, c\right ) - {\left (d^{3} \cos \left (2 \, d x + 2 \, c\right ) + d^{3}\right )} \left (-\frac {B^{4}}{d^{4}}\right )^{\frac {3}{4}}}{\cos \left (2 \, d x + 2 \, c\right ) + 1}\right ) + \frac {1}{2} i \, \left (-\frac {B^{4}}{d^{4}}\right )^{\frac {1}{4}} \log \left (\frac {B^{3} \sqrt {\frac {\cos \left (2 \, d x + 2 \, c\right ) + 1}{\sin \left (2 \, d x + 2 \, c\right )}} \sin \left (2 \, d x + 2 \, c\right ) - {\left (i \, d^{3} \cos \left (2 \, d x + 2 \, c\right ) + i \, d^{3}\right )} \left (-\frac {B^{4}}{d^{4}}\right )^{\frac {3}{4}}}{\cos \left (2 \, d x + 2 \, c\right ) + 1}\right ) - \frac {1}{2} i \, \left (-\frac {B^{4}}{d^{4}}\right )^{\frac {1}{4}} \log \left (\frac {B^{3} \sqrt {\frac {\cos \left (2 \, d x + 2 \, c\right ) + 1}{\sin \left (2 \, d x + 2 \, c\right )}} \sin \left (2 \, d x + 2 \, c\right ) - {\left (-i \, d^{3} \cos \left (2 \, d x + 2 \, c\right ) - i \, d^{3}\right )} \left (-\frac {B^{4}}{d^{4}}\right )^{\frac {3}{4}}}{\cos \left (2 \, d x + 2 \, c\right ) + 1}\right ) \]
[In]
[Out]
\[ \int \frac {a B+b B \tan (c+d x)}{\sqrt {\cot (c+d x)} (a+b \tan (c+d x))} \, dx=B \int \frac {1}{\sqrt {\cot {\left (c + d x \right )}}}\, dx \]
[In]
[Out]
none
Time = 0.39 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.84 \[ \int \frac {a B+b B \tan (c+d x)}{\sqrt {\cot (c+d x)} (a+b \tan (c+d x))} \, dx=-\frac {2 \, \sqrt {2} B \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) + 2 \, \sqrt {2} B \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) + \sqrt {2} B \log \left (\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right ) - \sqrt {2} B \log \left (-\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right )}{4 \, d} \]
[In]
[Out]
\[ \int \frac {a B+b B \tan (c+d x)}{\sqrt {\cot (c+d x)} (a+b \tan (c+d x))} \, dx=\int { \frac {B b \tan \left (d x + c\right ) + B a}{{\left (b \tan \left (d x + c\right ) + a\right )} \sqrt {\cot \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Time = 9.41 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.34 \[ \int \frac {a B+b B \tan (c+d x)}{\sqrt {\cot (c+d x)} (a+b \tan (c+d x))} \, dx=\frac {{\left (-1\right )}^{1/4}\,B\,\mathrm {atan}\left ({\left (-1\right )}^{1/4}\,\sqrt {\frac {1}{\mathrm {tan}\left (c+d\,x\right )}}\right )\,1{}\mathrm {i}}{d}+\frac {{\left (-1\right )}^{1/4}\,B\,\mathrm {atanh}\left ({\left (-1\right )}^{1/4}\,\sqrt {\frac {1}{\mathrm {tan}\left (c+d\,x\right )}}\right )\,1{}\mathrm {i}}{d} \]
[In]
[Out]